/* $Id: ViewMenu.java 60 2010-02-01 19:54:35Z aaron.day $ */
package org.crazydays.gameplan.view;


import javax.swing.JMenu;
import javax.swing.JMenuItem;

import org.crazydays.gameplan.map.action.ToggleGrid;
import org.crazydays.i18n.Messages;

/**
 * ViewMenu
 */
public class ViewMenu
    extends JMenu
{
    /** serial version uid */
    public final static long serialVersionUID =
        "$Id: ViewMenu.java 60 2010-02-01 19:54:35Z aaron.day $".hashCode();

    /** messages */
    protected final static Messages MESSAGES = Messages.getInstance();

    /** toggle grid */
    protected ToggleGrid toggleGrid;

    /**
     * ViewMenu constructor.
     */
    public ViewMenu()
    {
        super(MESSAGES.format("GamePlan.menu.view"));
    }

    /**
     * Set toggle grid.
     * 
     * @param toggleGrid ToggleGrid
     */
    public void setToggleGrid(ToggleGrid toggleGrid)
    {
        this.toggleGrid = toggleGrid;
    }

    /**
     * Initialize menu items.
     */
    protected void initialize()
    {
        add(new JMenuItem(toggleGrid));
    }
}
